package com.fourth_groups.shopping121store.ui.category.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Window;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.fourth_groups.shopping121store.R;

public class CategoryIntoStoreActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_category_store);

        final WebView wvChat=(WebView) findViewById(R.id.wv_store_category_goods_detail);
        Intent intent=getIntent();
        String url = intent.getStringExtra("chat");
        wvChat.loadUrl(url);
        wvChat.getSettings().setJavaScriptEnabled(true);
        wvChat.setWebViewClient(new WebViewClient(){
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                wvChat.loadUrl(url);
                return true;
            }
        });
    }
}
